/**
 * 
 */
package com.asset.salesforce.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
 * @author Hisham
 *
 */


@SuppressWarnings("serial")
@Table(name="join_request")
@Entity
public class JoinRequest implements Serializable {
	
	private Integer id;
	private Employee owner;
	private Employee emp;
	private Integer status;
	private Date startDate;
	private Date endDate;
	/**
	 * @return the id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="join_request_id_seq")
	@SequenceGenerator(name="join_request_id_seq",sequenceName="join_request_id_seq",allocationSize=1)	
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the owner
	 */
	@OneToOne(cascade = CascadeType.ALL)
	public Employee getOwner() {
		return owner;
	}
	/**
	 * @param owner the owner to set
	 */
	public void setOwner(Employee owner) {
		this.owner = owner;
	}
	/**
	 * @return the emp
	 */
	@OneToOne(cascade = CascadeType.ALL)
	public Employee getEmp() {
		return emp;
	}
	/**
	 * @param emp the emp to set
	 */
	public void setEmp(Employee emp) {
		this.emp = emp;
	}
	/**
	 * @return the status
	 */
	@Column(name="status")
	public Integer getStatus() {
		return status;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}
	/**
	 * @return the startDate
	 */
	@Column(name="start_date")
	public Date getStartDate() {
		return startDate;
	}
	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	/**
	 * @return the endDate
	 */
	@Column(name="end_date")
	public Date getEndDate() {
		return endDate;
	}
	/**
	 * @param endDate the endDate to set
	 */
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
}
